<template>
  <div class="r_flex HiddenPhone" >
    <p v-if="cityModel" >
      {{hiddenvalue.substring(0, 3)+"****"+hiddenvalue.substr(hiddenvalue.length-4)}}
      <i class="el-icon-view"></i>
    </p>
    <p v-else >{{hiddenvalue}}</p>
  </div>
</template>

<script>
import { cityList, cityTree } from '@/api/business/city'

export default {
  name: 'CityInput',
  props: {
    // 城市 - 单选/多选
    hiddenvalue: {
      type: String,
      default: ''
    },
  },
  data() {
    return {
      cityModel: false,
    }
  },
  created() {
  },
  mounted() {
  },
  methods: {
    // 电话号码隐藏
    netTel(tel){
      var reg = /^(\d{3})\d{4}(\d{4})$/;  
      return tel.replace(reg, "$1****$2");
    },
  },
  destroved(){
    console.log('销毁完成')
  },
  watch: {
  }
}
</script>

<style lang="scss">
.HiddenPhone {
  width: 110px;
  color: #1890ff;
  p {
    cursor: pointer;
  }
}
</style>
